set auto_path [concat  ../pkg/TMD $auto_path]
set oldfiles [open .exist w  ]
puts $oldfiles  [exec ls]
close $oldfiles
set old [pwd]
if ![catch { package require TMD }] {
        puts "Test core/Interface"
        source core/testInterface.tcl
        puts "Test core/Charmm"
        source core/testCharmm.tcl
} else {
        puts "Cannot load package TMD!"
}

#clean up
cd $old
set flist [read [open .exist r]]
foreach f [exec ls] {
        if {[lsearch $flist $f] <0 } {
                exec rm -rf $f
        } 
}
